<?php defined('InShopNC') or exit('Access Invalid!');?>
<div class="page">
  <div class="fixed-bar">
    <div class="item-title">
      <h3>商品热度分析</h3>
     
    </div>
  </div>
  <div class="fixed-empty"></div>

<form id="add_form" method="post" action="index.php?act=fever&op=fever_list" enctype="multipart/form-data">
    <input type="hidden" name="form_submit" value="ok" />

          <label class="validation" for="start">
          开始时间:</label><input type="text" id="activity_start_date" class="txt date" name="start" value="<?php if (empty($output['start'])) {echo date('Y-m-d',TIMESTAMP);} else{echo date('Y-m-d',$output['start']);}?>"/></td>

         <label class="validation" for="end">
        结束时间:</label><input type="text" id="activity_end_date" class="txt date" name="end" value="<?php if (empty($output['end'])) {echo date('Y-m-d',TIMESTAMP);} else{echo date('Y-m-d',$output['end']);}?>"/>
        </td>
         <label class="validation" for="">
        商品名称:</label><input type="text" id="key" class="" name="key" value="<?php echo $output['key'];?>"/></td>

<a  href="JavaScript:void(0);" class="btn" id="submitBtn"><span><?php echo $lang['nc_submit'];?></span></a></td>

  </form>
  
  <table class="table tb-type2" id="prompt">
    <tbody>
      <tr class="space odd">
        <th class="nobg" colspan="12"><div class="title"><h5><?php echo $lang['nc_prompts'];?></h5><span class="arrow"></span></div></th>
      </tr>
     
    </tbody>
  </table>
  <form method='post' id="list_form">
    <input type="hidden" name="form_submit" value="ok" />
    <input type="hidden" name="submit_type" id="submit_type" value="" />
    <input type="hidden" name="class_id" id="class_id">
    
    
    <table class="table tb-type2">
      <thead>
        <tr class="thead">
          <th></th>
          <th>商品id</th>
          <th>商品名称</th>
          <th>商品单价</th>
          <th>操作类型</th>
          <th>操作次数</th>
          <th>查看详情</th>
         
         
        </tr>
      </thead>
      <tbody>
        <?php if (!empty($output['fever_list']) && is_array($output['fever_list'])) { ?>
        <?php foreach ($output['fever_list'] as $val) { ?>
           <tr class="hover edit">
              <td></td>
              <td class="w48 sort">
                <span nc_type="inline_edit" ajax_branch="class" ><?php echo $val['fever_goodsid'];?></span>
              </td>
              <td class="name">
                <span nc_type="inline_edit" ajax_branch="class" ><?php echo $val['fever_goodsname'];?></span>
                
              </td>
              <td class="name">
                <span nc_type="inline_edit" ajax_branch="class" ><?php echo $val['fever_goodsprice'];?></span>
                
              </td>
              <td class="name">
                <span nc_type="inline_edit" ajax_branch="class" >
                <?php 
                    if($val['fever_actiontype']==1 ){ echo "浏览";}
                    elseif($val['fever_actiontype']==2){ echo "加入购物车";}
                    elseif($val['fever_actiontype']==3){ echo "删除购物车";}
                    elseif($val['fever_actiontype']==4){ echo "提交订单";}
                    elseif($val['fever_actiontype']==5){ echo "支付成功";}
               ?>
                </span>
                
              </td>
              <td class="name">
                <span nc_type="inline_edit" ajax_branch="class" ><?php echo $val['fever_count'];?></span>
                
              </td>
              <td class="name">
                <span nc_type="inline_edit" ajax_branch="class" ><a href="<?php echo urlAdmin('fever', 'fever_detail', array('goods_id' => $val['fever_goodsid'],'start'=>$output['start'],'end'=>$output['end'],'key'=>$output['key']));?>">查看详情</a></span>
                
              </td>

              
            </tr>
        <?php } ?>
        <?php }  ?>
        
      </tbody>
     
    </table>
  </form>
</div>
<link type="text/css" rel="stylesheet" href="<?php echo RESOURCE_SITE_URL."/js/jquery-ui/themes/ui-lightness/jquery.ui.css";?>"/>
<script src="<?php echo RESOURCE_SITE_URL."/js/jquery-ui/jquery.ui.js";?>"></script> 
<script src="<?php echo RESOURCE_SITE_URL."/js/jquery-ui/i18n/zh-CN.js";?>" charset="utf-8"></script> 
<script type="text/javascript">

$(function(){
	$("#submitBtn").click(function(){//window.location.reload();
		if($("#add_form").valid()){
    		$("#add_form").submit();
		}
    	
    });
});

$(document).ready(function(){
	$("#activity_start_date").datepicker({dateFormat: 'yy-mm-dd'});
	$("#activity_end_date").datepicker({dateFormat: 'yy-mm-dd'});
});

</script>